package com.chlitina.store.modules.cash.model;

/**
 * 
 * @author Sopngsong.xu
 * 
 */
public class AllCardPaymentDetail {
	private AllCardPayment cardPayment;
	private float currentLeftMoney;
	private float realCost;

	/**
	 * 该卡片的最终结算情况，可以获取最新的支出情况，从而计算最新余额
	 * 
	 * @return
	 */
	public AllCardPayment getCardPayment() {
		return cardPayment;
	}

	public void setCardPayment(CardPayment allCardPayment) {
		this.cardPayment = (AllCardPayment) allCardPayment;
	}

	public float getCurrentLeftMoney() {
		return currentLeftMoney;
	}

	public void setCurrentLeftMoney(float currentLeftMoney) {
		this.currentLeftMoney = currentLeftMoney;
	}

	public float getRealCost() {
		return realCost;
	}

	public void setRealCost(float realCost) {
		this.realCost = realCost;
	}

	public void appendPay(float add) {
		realCost += add;
		cardPayment.setCurrentMoney(cardPayment.getCurrentMoney() - add);
		cardPayment.setMoney(cardPayment.getMoney() + add);

	}

	public void reset() {
		realCost = 0;
		currentLeftMoney = 0;
	}
}
